/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package nadesicoi


import groovy.sql.*;

/**
 *
 * @author Usuario
 */
class StatusQ {
    static def asignarA(serv) {
        serv.topVentas = topVentas
    }
    static def topVentas = {
        def db = Sql.newInstance("jdbc:mysql://localhost/omoikane?user=root&password=", "root", "", "com.mysql.jdbc.Driver")
        def resultado = db.rows("SELECT id_corte, desde, hasta, total FROM cortes limit 10", []);
        db.close()
        resultado
    }
}

